package com.along.game.model;

import java.math.BigDecimal;

/**
 * MusicId entity. @author MyEclipse Persistence Tools
 */

public class Music implements java.io.Serializable {

	// Fields

	private BigDecimal id;
	private String musicName;
	private String musicUrl;
	private String musicType;

	// Constructors

	/** default constructor */
	public Music() {
	}

	/** full constructor */
	public Music(BigDecimal id, String musicName, String musicUrl,
			String musicType) {
		this.id = id;
		this.musicName = musicName;
		this.musicUrl = musicUrl;
		this.musicType = musicType;
	}

	// Property accessors

	public BigDecimal getId() {
		return this.id;
	}

	public void setId(BigDecimal id) {
		this.id = id;
	}

	public String getMusicName() {
		return this.musicName;
	}

	public void setMusicName(String musicName) {
		this.musicName = musicName;
	}

	public String getMusicUrl() {
		return this.musicUrl;
	}

	public void setMusicUrl(String musicUrl) {
		this.musicUrl = musicUrl;
	}

	public String getMusicType() {
		return this.musicType;
	}

	public void setMusicType(String musicType) {
		this.musicType = musicType;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Music))
			return false;
		Music castOther = (Music) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getMusicName() == castOther.getMusicName()) || (this
						.getMusicName() != null
						&& castOther.getMusicName() != null && this
						.getMusicName().equals(castOther.getMusicName())))
				&& ((this.getMusicUrl() == castOther.getMusicUrl()) || (this
						.getMusicUrl() != null
						&& castOther.getMusicUrl() != null && this
						.getMusicUrl().equals(castOther.getMusicUrl())))
				&& ((this.getMusicType() == castOther.getMusicType()) || (this
						.getMusicType() != null
						&& castOther.getMusicType() != null && this
						.getMusicType().equals(castOther.getMusicType())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getMusicName() == null ? 0 : this.getMusicName().hashCode());
		result = 37 * result
				+ (getMusicUrl() == null ? 0 : this.getMusicUrl().hashCode());
		result = 37 * result
				+ (getMusicType() == null ? 0 : this.getMusicType().hashCode());
		return result;
	}

}